import base from "./base"; // 导入接口域名列表
import axios from "../http"; // 导入http中创建的axios实例
import qs from "qs"; // 根据需求是否导入qs模块

const login = {
  login(params) {
    return axios.post(`${base.bd}/admin/login/index`, qs.stringify(params));
  },
  sendcode(params){
    return axios.post(`${base.bd}/admin/login/sendcode`, qs.stringify(params));
  },
  phonelogin(params){
    return axios.post(`${base.bd}/admin/login/phonelogin`, qs.stringify(params));
  },
  logout(params){
    return axios.post(`${base.bd}/admin/login/logout`, qs.stringify(params));
  },
  getLoginConfig(params) {
    return axios.post(`${base.bd}/admin/login/config`, qs.stringify(params));
  },
  regUser(params){
    return axios.post(`${base.bd}/admin/made/index`, qs.stringify(params));
  }
};
export default login;
